﻿using System;
using System.Collections.Generic;
namespace JSMVP.Domain
{
    public class Cart
    {
        public List<CartItem> Items = new List<CartItem>();
        public ShippingMethod shippingMethod = new ShippingMethod();
        private double _subTotal;
        public double _total;
        
        public double SubTotal{
            get
            {
                double sum=0;
                Items.ForEach(delegate(CartItem item){sum += item.product.Price*item.quantity;});
                return sum;
            }
        }
    }
}
